<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>缴费记录</title>
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>

    <link rel="stylesheet" href="../js/libs/sui/sm.min.css">
    <link rel="stylesheet" href="../js/libs/sui/sm-extend.min.css">
    <link rel="stylesheet" href="../iconfont/iconfont.css">
    <link rel="stylesheet" href="../less/main.css"/>

    <script type='text/javascript' src='../js/libs/jquery-3.1.0.min.js' charset='utf-8'></script>
    <script type="text/javascript">
        var Zepto = jQuery;
    </script>
    <script type='text/javascript' src='../js/libs/sui/sm.js' charset='utf-8'></script>
    <script type='text/javascript' src='../js/libs/sui/sm-extend.min.js' charset='utf-8'></script>
    <script src="../js/libs/juicer-min.js"></script>
    <script src="../js/libs/jquery.md5.js"></script>
    <script src="../js/api.js"></script>
    <script src="../js/utils.js"></script>
    <script src="../js/common.js"></script>
</head>
<body>
<div class="page bg-white">
    <!-- 头部-->
    <div class="head-no-toolbar bg-self-green no-left-icon">
        <span class="icon iconfont c-white p-l" onclick="javascript:closeWin();">&#xe61f;</span>
        <span class="c-white t-center">缴费记录</span>
    </div>

    <div class="content pull-to-refresh-content t-0" data-ptr-distance="20">
        <div class="pull-to-refresh-layer">
            <div class="preloader"></div>
            <div class="pull-to-refresh-arrow"></div>
        </div>

        <div class="list-block set-ul-b m-0">
            <ul id="pay-list">
                <!--<li class="item-content">-->
                    <!--<div class="item-inner set-div-b">-->
                        <!--<div class="item-title">福原爱:霞姐太强找不到机会</div>-->
                        <!--<div class="item-after f-time">2016-08-05 10:25:26</div>-->
                    <!--</div>-->
                <!--</li>-->
                <!--<li class="item-content">-->
                    <!--<div class="item-inner set-div-b">-->
                        <!--<div class="item-title">女乒“88黄金一代”奥运谢幕-->
                        <!--</div>-->
                        <!--<div class="item-after f-time">2016-08-05 10:25:26</div>-->
                    <!--</div>-->
                <!--</li>-->
                <!--<li class="item-content">-->
                    <!--<div class="item-inner set-div-b">-->
                        <!--<div class="item-title">西媒力挺孙杨:用金牌回击涉药质疑 夺冠创造历史</div>-->
                        <!--<div class="item-after f-time">2016-08-05 10:25:26</div>-->
                    <!--</div>-->
                <!--</li>-->
                <!--<li class="item-content">-->
                    <!--<div class="item-inner set-div-b">-->
                        <!--<div class="item-title">女乒“88黄金一代”奥运谢幕-->
                        <!--</div>-->
                        <!--<div class="item-after f-time">2016-08-05 10:25:26</div>-->
                    <!--</div>-->
                <!--</li>-->
                <!--<li class="item-content">-->
                    <!--<div class="item-inner set-div-b">-->
                        <!--<div class="item-title">西媒力挺孙杨:用金牌回击涉药质疑 夺冠创造历史</div>-->
                        <!--<div class="item-after f-time">2016-08-05 10:25:26</div>-->
                    <!--</div>-->
                <!--</li>-->
            </ul>

        </div>
    </div>


</div>
<script id="pay-list-tpl" type="text/template">
    {@each payList as it,index}
    <li class="item-content">
        <div class="item-inner set-div-b">
            <div class="item-title">&{it.CLASS_TYPE_NAME} &{it.CHARGE_FEE}元</div>
            {@if (it.CHARGE_DATE!=null)&&(it.CHARGE_DATE!="")}
            <div class="item-after f-time">&{it.CHARGE_DATE}</div>
            {@/if}
        </div>
    </li>
    {@/each}
</script>
<script>
    apiready=function(){
        juicer.set({
            'tag::operationOpen': '{@',
            'tag::operationClose': '}',
            'tag::interpolateOpen': '&{',
            'tag::interpolateClose': '}',
            'tag::noneencodeOpen': '$${',
            'tag::noneencodeClose': '}',
            'tag::commentOpen': '{#',
            'tag::commentClose': '}',
            'strip': false,
            'cache': false
        });

        var stuInfo=getLoginStudentInfo();
        var studentId=stuInfo.STUDENT_ID;
        var sql="select s1.STUDENT_ID,s1.STU_NAME,s1.CLASS_TYPE_NAME,s2.* from stu_enroll s1,stu_fee s2 where s1.STUDENT_ID='{0}' and s1.ENROLL_ID=s2.ENROLL_ID";
        var page=1;

        if(isObject(stuInfo)){
            dbQuery(page,10,sql.format(studentId),true,function(ret,err){
                if(isObject(ret)&&ret.statusCode==0){
                    if(ret.result.length>0){
                        var payData={payList:ret.result};
                        $("#pay-list").html(juicer($("#pay-list-tpl").html(),payData));
                    }else{

                        toast("暂无数据");
                    }
                }

            });
        }

        // 下拉刷新缴费记录
        $(document).on("refresh", ".pull-to-refresh-content", function () {
            if (isObject(stuInfo) && isNumber(studentId)) {
                page++;
                // 获取就业单位
                dbQuery(page, 10, sql.format(studentId), false, function (ret, err) {
                    if (isObject(ret) && (ret.statusCode == 0)) {
                        var payData={payList:ret.result};
                        if (payData.payList.length > 0) {
                            $("#pay-list").html(juicer($("#pay-list-tpl").html(),payData));
                        } else {
                            toast("已经加载完毕了");
                            page--;
                        }
                    }
                    $.pullToRefreshDone(".pull-to-refresh-content");
                });
            }
        });

    };
</script>
<script>$.init();</script>
</body>
</html>


